SPB Git forge
38commits 1branches 0releases
338.7 MBsize
maindefault branch
6 h agolast push
HTML 53.9% TypeScript 44.5% JavaScript 0.6% SQL 0.5%
497 B · 12 lines tsx
Raw Blame History
1import { notFound } from "next/navigation";2import type { ReactNode } from "react";3import { api } from "@/lib/api";45/** Existence check outside the loading boundary so unknown slugs return a real 404 (the fetch is cached for the page). */6export default async function IxpLayout({ children, params }: { children: ReactNode; params: Promise<{ slug: string }> }) {7  const { slug } = await params;8  const r = await api.ixp(slug);9  if (!r.ok && r.status === 404) notFound();10  return children;11}12